/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 * Description: FSL QSPI driver Vendor Hooks
 */

#ifdef CONFIG_SPI_NXP_SFC
#if !defined(SPI_NXP_SFC_H) || defined(TRACE_HEADER_MULTI_READ)
#define SPI_NXP_SFC_H
#include <linux/spi/spi.h>

void trace_nxp_qspi_op_statistic(const struct spi_mem_op *op, int err);
void trace_nxp_qspi_set_ahb_mode(struct spi_mem_op *op, unsigned int rxfifo);
bool trace_nxp_qspi_get_ahb_mode(void);
#endif

#else

#include <linux/tracepoint.h>
struct spi_mem_op;
struct fsl_qspi;

DECLARE_EVENT_NOP(nxp_qspi_op_statistic,
	TP_PROTO(const struct spi_mem_op *op, int err),
	TP_ARGS(op, err));

DECLARE_EVENT_NOP(nxp_qspi_set_ahb_mode,
	TP_PROTO(struct spi_mem_op *op, unsigned int rxfifo),
	TP_ARGS(op, rxfifo));

static inline bool trace_nxp_qspi_get_ahb_mode(void)
{
	return true;
}

#endif
